import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class project {
    public boolean increasingTriplet(int[] nums) {
        int len=nums.length;
        if(len<3){
            return false;
        }
        int left=nums[0];
        int right=Integer.MAX_VALUE;
        for(int i=1;i<len;i++){
            int tmp=nums[i];
            if(tmp>left){
                right=tmp;
            }else if(tmp>right){
                return true;
            }else{
                right=tmp;
            }
        }
        return false;
    }




















    public static void main(String[] args) throws IOException {
        String srcPath="D:/IO代码演示/IO修改图片/zz.jpg";
        String destPath="D:/IO代码演示/IO修改图片/zz2.jpg";
        copyFile(srcPath,destPath);
    }
    public static void copyFile(String srcPath,String destPath) throws IOException {
        FileInputStream fileInputStream=new FileInputStream(srcPath);
        FileOutputStream fileOutputStream=new FileOutputStream(destPath);
        byte[] buffer=new byte[1024];
        int len=-1;
        while ((len=fileInputStream.read(buffer))!=-1){
            fileOutputStream.write(buffer,0,len);
        }
        fileInputStream.close();
        fileOutputStream.close();
    }
}
